#define _CRT_SECURE_NO_WARNINGS 1
#include"Heap.h"

void Heapqort(int* a, int n)
{
	int i = 0;
	for (i = 0; i <( n-1-1)/2; i--)
	{
		AdjustDown(a, n, i);
	}
	int j = 1;
	while (j < n)
	{
		Swap(&a[0], &a[n - j]);
		AdjustDown(a, n - j, 0);
		j++;
	}
}

int main()
{
	//int a[] = { 1,5,7,3,56,74,98,26,45 };
	//int i = 0;
	//Heap x;
	//HeapInit(&x);
	//for (i = 0; i < sizeof(a) / sizeof(int); i++)
	//{
	//	HeapPushBack(&x, a[i]);
	//	HeapPrintf(&x);
	//}

	int a[] = { 1,5,7,3,56,74,98,26,45 };

	return 0;
}